<%@ page import="java.util.List" %>
<%@ page import="com.jiazhong.Model.Goods" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Date" %><%--
  Created by IntelliJ IDEA.
  User: 陈洋
  Date: 2022/10/28
  Time: 17:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<c:set var="name" value="小张" scope="request"/>
${requestScope.name}<br>
<c:remove var="name" scope="request"/>
${requestScope.name}
<hr>
<c:if test="${1==1}">
    很聪明
</c:if>
<hr>
<c:choose>
    <c:when test="${1==1}">
        you are smart!
    </c:when>
    <c:otherwise>
        you are 大辞逼
    </c:otherwise>
</c:choose>
<hr>
<%
    List<Goods> goodsList=new ArrayList<Goods>();
    goodsList.add(new Goods(1,"小刀",10.0,new Date()));
    goodsList.add(new Goods(2,"橡皮",10.0,new Date()));
    goodsList.add(new Goods(3,"钢笔",10.0,new Date()));
    goodsList.add(new Goods(4,"铅笔",10.0,new Date()));
    request.setAttribute("goodsList",goodsList);
%>
<c:forEach var="goods" items="${requestScope.goodsList}" varStatus="status">
    ${status.index}+${status.count}+${goods.goods_id}+${goods.goods_name}+${goods.goods_price}+${goods.goods_time}<br>
</c:forEach>
<hr>
<c:forEach begin="1" end="10" step="2" var="num">
    ${num}我有对象啦！<br>
</c:forEach>
</body>
</html>
